#! /usr/bin/python
#! encoding: utf8

__author__ = 'kirienko'
## 3 Loops
# with open('results_3loops/maple_3loops.out') as fd:
with open('results_3loops/maple.inf.out') as fd:
    data = fd.readlines()
print "Result in 3 loops:\t\t",
print "%.8f"%sum([float(x.split(' --> ')[1]) for x in data])

## 3 Loops -- correction
with open('results_3loops/eps_in_3loops.out') as fd:
    data = fd.readlines()
print "Correction in 3 loops:\t",
print "%.13f"%sum([float(x.split(' --> ')[1]) for x in data])

## 4 Loops
with open('results_4loops/maple.12digits') as fd:
    data = fd.readlines()
print "Result in 4 loops:\t\t",
print "%.14f"%sum([float(x.split(' --> ')[1]) for x in data])
